var t = getApp(), a = require("./util/util.js");

Page({
    data: {
        sd_result_arr_cn: "",
        sd_result_arr_en: "",
        gjj_result_arr_cn: "",
        gjj_result_arr_en: "",
        rbt: "",
        dkt: "",
        total: "",
        byyue: "",
        jumpxcximg: ""
    },
    onLoad: function(r) {
        if (0 == r.dkt) l = (Number(t.globalData.sd_result_arr_en.list[0][2]) - Number(t.globalData.sd_result_arr_en.list[1][2])).toFixed(2); else if (1 == r.dkt) _ = (Number(t.globalData.gjj_result_arr_en.list[0][2]) - Number(t.globalData.gjj_result_arr_en.list[1][2])).toFixed(2); else var l = (Number(t.globalData.sd_result_arr_en.list[0][2]) - Number(t.globalData.sd_result_arr_en.list[1][2])).toFixed(2), _ = (Number(t.globalData.gjj_result_arr_en.list[0][2]) - Number(t.globalData.gjj_result_arr_en.list[1][2])).toFixed(2);
        if (this.setData({
            sd_result_arr_cn: t.globalData.sd_result_arr_cn,
            sd_result_arr_en: t.globalData.sd_result_arr_en,
            gjj_result_arr_cn: t.globalData.gjj_result_arr_cn,
            gjj_result_arr_en: t.globalData.gjj_result_arr_en,
            rbt: r.rbt,
            dkt: r.dkt,
            byyue: {
                sd: l,
                gjj: _
            }
        }), 2 == r.dkt) {
            var e = (Number(t.globalData.sd_result_arr_cn.total_dk) + Number(t.globalData.gjj_result_arr_cn.total_dk)).toFixed(2), s = (Number(t.globalData.sd_result_arr_cn.total) + Number(t.globalData.gjj_result_arr_cn.total)).toFixed(2), o = (Number(t.globalData.sd_result_arr_cn.total_lx) + Number(t.globalData.gjj_result_arr_cn.total_lx)).toFixed(2), u = (Number(t.globalData.sd_result_arr_en.total_dk) + Number(t.globalData.gjj_result_arr_en.total_dk)).toFixed(2), n = (Number(t.globalData.sd_result_arr_en.total) + Number(t.globalData.gjj_result_arr_en.total)).toFixed(2), b = (Number(t.globalData.sd_result_arr_en.total_lx) + Number(t.globalData.gjj_result_arr_en.total_lx)).toFixed(2);
            this.setData({
                total: {
                    total_dk_cn: e,
                    total_t_cn: s,
                    lx_t_cn: o,
                    total_dk_en: u,
                    total_t_en: n,
                    lx_t_en: b
                }
            });
        }
        var g = this;
        a.get_mmlc_img(function(t) {
            t.data && g.setData({
                jumpxcximg: t.data.src ? t.data.src : ""
            });
        });
    },

    chang_rbt: function(t) {
        var a = t.currentTarget.id;
        if (a == this.data.rbt) return !1;
        this.setData({
            rbt: a
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onShareAppMessage: function() {
        return t.globalData.sharedata;
    }
});